package com.gper.edu.flink.stream.window;

import org.apache.flink.api.java.tuple.Tuple3;
import org.apache.flink.streaming.api.functions.timestamps.BoundedOutOfOrdernessTimestampExtractor;
import org.apache.flink.streaming.api.windowing.time.Time;

/**
 * @Author: ellis.guan
 * @Description:
 * @Date: 2020/11/8 13:16
 * @Version: 1.0
 */
public class WindowTriggerWatermark extends BoundedOutOfOrdernessTimestampExtractor<Tuple3<Integer, Double, Long>> {

    public WindowTriggerWatermark(Time maxOutOfOrderness) {
        super(maxOutOfOrderness);
    }

    @Override
    public long extractTimestamp(Tuple3<Integer, Double, Long> element) {
        return element.f2;
    }
}